When coding moving pictures, the amount of information is compressed generally by reducing redundancy in temporal and spatial directions. In inter picture predictive coding for reducing temporal redundancy, for example, motion estimation is performed and a prediction picture is created on a block-by-block basis by referring to a preceding or a following picture. Then, a difference value between the created prediction picture and a current picture to be coded is coded.
Here, a “picture” is a term representing a single picture plane, and refers to a frame in a progressive image and to a frame or a field in an interlaced image.
The interlaced image is an image where a single frame includes two fields each provided at a different time. In coding the interlaced image, a single frame can be processed as a frame, as two fields, and as a frame structure or a field structure depending on each block in the frame.
A picture obtained not through inter picture predictive coding, but through intra picture predictive coding is called an I picture. Further, a picture obtained through inter picture predictive coding where only a single picture is referred to is called a P picture. Furthermore, a picture obtained through inter picture predictive coding where two or less pictures can be concurrently referred to is called a B picture.
It is to be noted that a reference picture needs to be coded and stored in a memory prior to a current picture to be coded, and is selected and specified appropriately for each block that is a base unit for coding.
The P picture or the B picture is coded through motion-compensation inter-picture predictive coding. The motion-compensation inter-picture predictive coding is a coding method that detects the amount of motion (motion vector) of each portion in a picture and performs a prediction in consideration of the amount of motion, thereby improving prediction accuracy and reducing data amount.
More specifically, in the motion-compensation inter-picture predictive coding, the motion vector is detected by finding, in a reference picture, a position of a block having pixel information that is the most similar to a current block to be coded of a current picture to be coded.
Further, only a difference (prediction residual) between a pixel value of the block at the position in the reference picture and a pixel value of the current block to be coded is coded. In the motion-compensation inter-picture predictive coding, the amount of data is reduced in a manner described above.
Accordingly, when a block more similar to the current block to be coded can be detected, the prediction residual becomes smaller, and thus high compression rate can be achieved.
Conversely, when a similar block cannot be detected, the amount of information necessary for coding the prediction residual increases. Therefore, under such a circumstance that enough coding amount cannot be allocated to the prediction residual due to a low bit rate, the prediction residual cannot be reproduced sufficiently, resulting in a distortion which causes deterioration in image quality as coding noise.
The coding noise is noticeable in a region where non-uniformity between pixel values is relatively small (hereinafter referred to as “flat region”). Taking the above into consideration, there is a technique (the first prior art) which detects the flat region in a current picture to be coded and sets a quantization width as a relatively small value in the flat region, thereby preventing coding noise from occurring in the flat region.
Further, in the case where a luminance change is relatively great between the current picture to be coded and the reference picture, it is difficult to detect a block similar to the current block to be coded in the reference picture. More specifically, a great luminance change in a current moving picture to be coded is one of the factors to increase prediction residual and one of the causes for coding noise occurrence.
FIG. 14 is a schematic view which is an example of a situation where prediction residual becomes great and explains the behavior of conventional motion compensation when a luminance change has occurred.
In FIG. 14, P3-Org is a current picture to be coded and P1-Ref and P2-Ref are reference pictures.
The example as illustrated in FIG. 14 shows that luminance changes as time advances. More specifically, the luminance gradually increases in order of P1-Ref, P2-Ref and P3-Org.
In such a case, the prediction residual becomes great from wherever a prediction is made. For example, a case is assumed in which a current block to be coded BL01 is predicted from a position of BL21, a current block to be coded BL02 is predicted from a position of BL12, and P3-Pred is created as a result.
In this case, since the pixel values greatly differ between blocks on which motion compensation has been performed, the pixel values of BL01 and BL02 are greatly different from the pixel values of respective corresponding blocks in P3-Pred that is the prediction picture. This increases the prediction residual of each block in P3-Org, and as a result, leads to a situation where coding noise is likely to occur.
In order to address such problems, Japanese Unexamined Patent Application Publication No. 2007-274671, for example, discloses a method of detecting a block affected by the luminance change in a picture and increasing a coding amount allocated to the block (the second prior art).
However, with the above-described first prior art, when pictures continue each of which includes a large proportion of flat regions, for example, the number of blocks for which the coding amount should be increased significantly increases.
As a result, the necessary coding amount in total increases, leading to a problem that sufficient compression efficiency cannot be obtained.
Further, with the above-described second prior art, when the luminance change occurs intensively in a limited area, it is possible to identify an object region and increase an image quality only in the region.
However, when the luminance change occurs in the entire picture plane or gradually over several frames, the number of blocks for which the coding amount should be increased significantly increases.
As a result, the necessary coding amount in total increases, leading to a problem that sufficient compression efficiency cannot be obtained, as in the above-described first prior art.
For example, a moving picture captured by a video camera has a characteristic that a luminance in the entire picture plane changes depending on a positional relation between a light source and a subject photographed by the camera. This causes frequent luminance changes in the entire picture plane when the camera or the subject photographed moves, the brightness of the light source changes, and the like.